package com.woniu51.websocket.domain;

import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * @author 杨光
 * @date 2022年04月12日 15:35
 */
@Table(name="tb_dashboard")
public class Dashboard {

    /** 主键 */
    @Id
    private Integer id;

    /** 影片名称 */
    private String movieName;

    /** 上映天数 */
    private Integer onlineDays;

    /** 综合票房（单位：万） */
    private Integer boxOffice;

    /** 总计票房 */
    private Integer generalBoxOffice;

    /** 票房占比 */
    private BigDecimal boxRatio;

    /** 排片场次总数 */
    private Integer playTimes;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Dashboard dashboard = (Dashboard) o;
        return id.equals(dashboard.id) &&
                movieName.equals(dashboard.movieName) &&
                onlineDays.equals(dashboard.onlineDays) &&
                boxOffice.equals(dashboard.boxOffice) &&
                generalBoxOffice.equals(dashboard.generalBoxOffice) &&
                Objects.equals(boxRatio, dashboard.boxRatio) &&
                Objects.equals(playTimes, dashboard.playTimes);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, movieName, onlineDays, boxOffice, generalBoxOffice, boxRatio, playTimes);
    }

    @Override
    public String toString() {
        return "Dashboard{" +
                "id=" + id +
                ", movieName='" + movieName + '\'' +
                ", onlineDays=" + onlineDays +
                ", boxOffice=" + boxOffice +
                ", generalBoxOffice=" + generalBoxOffice +
                ", boxRatio=" + boxRatio +
                ", playTimes=" + playTimes +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public Integer getOnlineDays() {
        return onlineDays;
    }

    public void setOnlineDays(Integer onlineDays) {
        this.onlineDays = onlineDays;
    }

    public Integer getBoxOffice() {
        return boxOffice;
    }

    public void setBoxOffice(Integer boxOffice) {
        this.boxOffice = boxOffice;
    }

    public Integer getGeneralBoxOffice() {
        return generalBoxOffice;
    }

    public void setGeneralBoxOffice(Integer generalBoxOffice) {
        this.generalBoxOffice = generalBoxOffice;
    }

    public BigDecimal getBoxRatio() {
        return boxRatio;
    }

    public void setBoxRatio(BigDecimal boxRatio) {
        this.boxRatio = boxRatio;
    }

    public Integer getPlayTimes() {
        return playTimes;
    }

    public void setPlayTimes(Integer playTimes) {
        this.playTimes = playTimes;
    }
}
